<template>
  <div class="div">
    <el-form :inline="true" :model="formInline" class="demo-form-inline">
      <el-form-item label="姓名：">
        <el-input ></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">新增</el-button>
      </el-form-item>
    </el-form>
    <el-table
    ref="multipleTable"
    :data="tableData"
    tooltip-effect="dark"
    style="width: 100%"
    @selection-change="handleSelectionChange">
    <el-table-column
      type="selection"
      width="25"  
      >
    </el-table-column>
    <el-table-column
      
      label="全选"
      >
    </el-table-column>
   
    <el-table-column
      prop="name"
      label="姓名"
      >
    </el-table-column>
    <el-table-column
      prop="sex"
      label="性别"
     >
    </el-table-column>
    <el-table-column
      prop="phone"
      label="手机号"
     >
     
    </el-table-column>
    			
    <el-table-column
      prop="cardtype"
      label="证件类型"
     >
     
    </el-table-column>
    <el-table-column
      prop="idcard"
      label="证件号码"
      width="155"
     >
     
    </el-table-column>
    <el-table-column
      prop="email"
      label="邮箱"
     >
     
    </el-table-column>
    <el-table-column
      prop="op"
      label="操作"
     >
     
    </el-table-column>
    
  </el-table>
  </div>
</template>

<script>
export default {
    data() {
      return {
        formInline: {
          user: '',
          region: ''
        },
        tableData:[],
        multipleSelection: []

      }
    },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
    toggleSelection(rows) {
        if (rows) {
          rows.forEach(row => {
            this.$refs.multipleTable.toggleRowSelection(row);
          });
        } else {
          this.$refs.multipleTable.clearSelection();
        }
      },
      handleSelectionChange(val) {
        this.multipleSelection = val;
      }
    }
  
};
</script>

<style lang="scss" scoped>
.div{
    margin-left: 20px;
   border-radius: 10px;
   background-color: #fff;
}
.el-input{
    width: 600px;
 }
.el-form-item{
    margin: 5px;
}
</style>